# Contributor: Alan Lacerda <alacerda@alpinelinux.org>
# Maintainer: Alan Lacerda <alacerda@alpinelinux.org>
pkgname=atril
pkgver=1.28.0
pkgrel=0
pkgdesc="A document viewer for MATE"
url="https://github.com/mate-desktop/atril"
# ppc64le, s390x, riscv64 and loongarch64 blocked by texlive
arch="all !ppc64le !s390x !riscv64 !loongarch64"
license="GPL-2.0-or-later"
depends="mate-icon-theme"
# tests require missing package py3-dogtail
options="!check"
makedepends="
	caja-dev
	caja-extensions-dev
	dconf-dev
	djvulibre-dev
	glib-dev
	gtk+3.0-dev
	intltool
	itstool
	libgxps-dev
	libsecret-dev
	libsm-dev
	libspectre-dev
	libxml2-dev
	libxml2-utils
	mate-desktop-dev
	poppler-dev
	python3-dev
	texlive-dev
	tiff-dev
	webkit2gtk-4.1-dev
	"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="https://pub.mate-desktop.org/releases/${pkgver%.*}/atril-$pkgver.tar.xz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--sysconfdir=/etc \
		--enable-static=no \
		--prefix=/usr
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
dd5f77b3ba2033a3591e0f58742d75eefdd0bfdcdec80a6aa6148a1cf37e4508776733013f946103bdf0412f35dee0b283cc254fa0033fc14966df323bb371a8  atril-1.28.0.tar.xz
"
